<!DOCTYPE html>
<html>
<head>
    <title>flex</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <style>
        .box {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: space-evenly;
            align-content: space-evenly;
            align-items: center;
            width: 480px;
            height: 480px;
            border: 1px solid red;
        }

        .item {
            width: 100px;
            height: 100px;
            line-height: 100px;
            text-align: center;
            border: 1px solid green;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
    <div class="item">8</div>
    <div class="item">9</div>
    <div class="item">10</div>
    <div class="item">11</div>
    <div class="item">12</div>
    <div class="item">13</div>
    <div class="item">14</div>
    <div class="item">15</div>
    <div class="item">16</div>
</div>
</body>
</html>